package com.axxy.command;

import com.axxy.command.entity.Light;

/**
 * @author 一缕茜阳
 * @date 2021/7/29
 */
public class CommandTest {
    public static void main(String[] args) {
        Light light = new Light();
        LightOnCommand lightOnCommand = new LightOnCommand(light);
        LightOffCommand lightOffCommand = new LightOffCommand(light);

        Command[] commands = new Command[8];
        for (int i = 0; i < 7; i++) {
            commands[i] = lightOnCommand;
        }
        commands[7] = lightOffCommand;
        Control control = new Control();
        control.setCommands(commands);
        control.startTask();
    }
}
